In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you would like to talk about tasks, solutions or technical problems, please visit our Discord servers. They are moderated by the community, but members of the support team are also active there.
Byteasar is preparing the hardest task for the last online round of Algorithmic Engagements 2012. You should not be surprised by the fact that this task is about computational geometry, and more precisely, computing intersections of a polygon and different circles.
Everyone knows that the most difficult part of computational geometry is dealing with special cases. Byteasar has managed to find out that the most evil special case in his task happens when the area of a polygon equals the number of its vertices. Moreover, the edges of the polygon should be parallel to OX or OY axis and every two consecutive edges should be perpendicular. The edges may not intersect apart from pairs of consecutive edges which obviously meet at the same vertex.
Byteasar is having problems with generating such polygons, so he asked you for help.
The first and only line of input contains one integer () denoting the number of vertices of the polygon.
If no polygon with vertices satisfies Byteasar's requirements, your program should output a single word NIE (i.e., no in Polish). Otherwise the output should consist of lines. The -th line should contain two integers and representing the coordinates of the -th vertex. The vertices should be given in the same order as they appear on the perimeter of the polygon (the direction along the perimeter in which the vertices are given may be arbitrary). No coordinate may exceed by the absolute value.
For the input data:
4
the correct result is:
0 0 2 0 2 2 0 2
Task author: Jakub Lacki.